/*
 * @Author: your name
 * @Date: 2020-11-13 14:19:32
 * @LastEditTime: 2020-11-13 14:29:16
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \wx-x-mai\pages\workService\instructions\index.js
 */
// pages/workService/instructions/index.js
const app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    content: "",
    status: 1,
    check: "../../../assets/images/check_2.png",
    checked: "../../../assets/images/check_1.png",
    shows: true
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.getList();
  },
  getList () {
    const request = {
      id: 1
    }
    wx.$API['workService/protocolget'](request).then((response) => {
      this.setData({
        content: response.data[0].content
      })
      app.globalData.maskConfig = response.data[0];
    }).catch((error) => {
      wx.showToast({
        title: error,
        icon: "none"
      })
      console.log(error, "失败")
    })
  },
  radioChange: function (e) {
    if (!this.data.content) return
    this.setData({
      shows: !this.data.shows
    })
  },
  sueeess: function () {
    if (this.data.shows == false) {
      wx.navigateTo({
        url: '../../workService/documentagent/index',
      })
    }
  },
})